﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections;
using DuckClient.Helpers;

namespace DuckClient
{
    public class DuckControl : Control
    {
        public DuckControl()
        {
            this.DefaultStyleKey = typeof(DuckControl);
        }

        public List<object> ItemsSource 
        { 
            get
            {
                return (List<object>)GetValue(ItemsSourceProperty);
            }
            set
            {
                SetValue(ItemsSourceProperty, value);
            }
        }

        public static readonly DependencyProperty ItemsSourceProperty =
            DependencyProperty.Register(
            "ItemsSource",
            typeof(List<object>),
            typeof(DuckControl),
            null);
        
        public string NameProperty 
        {
            get
            {
                return (string)GetValue(NamePropertyProperty);
            }
            set
            {
                SetValue(NamePropertyProperty, value);
            }
        }

        public static readonly DependencyProperty NamePropertyProperty =
            DependencyProperty.Register(
            "NameProperty",
            typeof(string),
            typeof(DuckControl),
            null);

        public string SizeProperty
        {
            get
            {
                return (string)GetValue(SizePropertyProperty);
            }
            set
            {
                SetValue(SizePropertyProperty, value);
            }
        }

        public static readonly DependencyProperty SizePropertyProperty =
            DependencyProperty.Register(
            "SizeProperty",
            typeof(string),
            typeof(DuckControl),
            null);

        public RelayCommand SelectOther
        {
            get
            {
                return (RelayCommand)GetValue(SelectOtherProperty);
            }
            set
            {
                SetValue(SelectOtherProperty, value);
            }
        }

        public static readonly DependencyProperty SelectOtherProperty =
            DependencyProperty.Register(
            "SelectOther",
            typeof(RelayCommand),
            typeof(DuckControl),
            null);
    }
}
